package com.magicsoft.app.entity;

import java.io.Serializable;

import net.tsz.afinal.annotation.sqlite.Id;
import net.tsz.afinal.annotation.sqlite.Table;

/**
 * 区县实体
 * 
 * @author liqingjun
 * 
 */
@Table(name = "district")
public class DistrictEntity implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -3625686044082657253L;

	@Id(column = "districtid")
	private int districtid;
	private String districtname;
	private int provinceid;
	private int cityid;
	private String index_keys;

	public int getDistrictid() {
		return districtid;
	}

	public void setDistrictid(int districtid) {
		this.districtid = districtid;
	}

	public String getDistrictname() {
		return districtname;
	}

	public void setDistrictname(String districtname) {
		this.districtname = districtname;
	}

	public int getProvinceid() {
		return provinceid;
	}

	public void setProvinceid(int provinceid) {
		this.provinceid = provinceid;
	}

	public int getCityid() {
		return cityid;
	}

	public void setCityid(int cityid) {
		this.cityid = cityid;
	}

	public String getIndex_keys() {
		return index_keys;
	}

	public void setIndex_keys(String index_keys) {
		this.index_keys = index_keys;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + cityid;
		result = prime * result + districtid;
		result = prime * result
				+ ((districtname == null) ? 0 : districtname.hashCode());
		result = prime * result
				+ ((index_keys == null) ? 0 : index_keys.hashCode());
		result = prime * result + provinceid;
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		DistrictEntity other = (DistrictEntity) obj;
		if (cityid != other.cityid)
			return false;
		if (districtid != other.districtid)
			return false;
		if (districtname == null) {
			if (other.districtname != null)
				return false;
		} else if (!districtname.equals(other.districtname))
			return false;
		if (index_keys == null) {
			if (other.index_keys != null)
				return false;
		} else if (!index_keys.equals(other.index_keys))
			return false;
		if (provinceid != other.provinceid)
			return false;
		return true;
	}

}
